/**
 * Created by apple on 2017/7/1.
 */
import React,{Component} from 'react';
import {
  View, Text,
  StyleSheet, Navigator
} from "react-native";
import WelcomePage from './WelcomePage'

function setup() {
  //进行初始化配置
  class Rooter extends Component{
    renderScene(route,navigator){
      console.log('调用renderscen')
      let Component = route.component;
      return <Component navigator={navigator} {...route.param}/>
    }
    render(){
      return (
        <View style={{flex:1,backgroundColor:'blue'}}>
          <Navigator
            initialRoute = {{
              component: WelcomePage
            }}
            renderScene = {(route,navigator) =>{
              let Component = route.component;
              return <Component navigator = {navigator} {...route.params}/>
            }}
          />
        </View>


      )
    }
  }
  return <Rooter/>
}

module.exports=setup;



